//
//  PrivateLetterCell.m
//  collection
//
//  Created by Jing Zhang on 4/27/12.
//  Copyright (c) 2012 Tsinghua University. All rights reserved.
//

#import "PrivateLetterCell.h"

@implementation PrivateLetterCell

@synthesize avatarView = _avatarView;
@synthesize nicknameLabel = _nicknameLabel;
@synthesize lastMessageLabel = _lastMessageLabel;

- (void)dealloc {
    
    self.avatarView = nil;
    self.nicknameLabel = nil;
    self.lastMessageLabel = nil;
    
    [super dealloc];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    
    self = [super initWithCoder:aDecoder];
    if (self) {
        UIView* bgView = [[UIView alloc] initWithFrame:self.frame];
        bgView.backgroundColor = [UIColor colorWithRed:229.0 / 255.0 green:229.0 / 255.0 blue:229.0 / 255.0 alpha:1];
        self.selectedBackgroundView = bgView;
        [bgView release];
    }
    
    return self;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        UIView* bgView = [[UIView alloc] initWithFrame:self.frame];
        bgView.backgroundColor = [UIColor colorWithRed:229.0 / 255.0 green:229.0 / 255.0 blue:229.0 / 255.0 alpha:1];
        self.selectedBackgroundView = bgView;
        [bgView release];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
